Repository navigation
Conversation
The pyproject helper built a Go container for every read of a pyproject.toml. Read the file with TOML.decode instead: requires-python, use-uv, base-image, global-client, the workspace members and the generated marker, and the Python floor refusal, which now takes the floor from sdk/pyproject.toml instead of a copy of it. A value of another type than the one read stays unset, and a marker that does not parse reads as no marker, as before. The set-* commands stay in Go: TOML.encode does not write the bytes go-toml writes (quoting, indentation, trailing newline, datetimes), so moving them would change every file they edit. Signed-off-by: Yves Brissaud <yves@dagger.io>
eunomie
force-pushed
the
pyproject-reads-in-dang
branch
from
November 10, 2026 14:12
9a9f370 to
ebeab1a
Compare
Every caller passes the file, so its toml takes no default. Signed-off-by: Yves Brissaud <yves@dagger.io>
The Go helper's tables for the refusal went with its code. Run the same cases through generation: a .python-version pin, requires-python ranges and exact pins, prereleases of the floor, unreadable versions, a base image of the module's own, and the last release offered only to a Python it runs on. An sdk/ of the user's own stops each case right after the refusal, so the cases cost no generation. Signed-off-by: Yves Brissaud <yves@dagger.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reads
pyproject.tomlwithTOML.decodein Dang instead of awithExecof the Go pyproject helper. This covers requires-python, use-uv, base-image, global-client, workspace members, the generated-member marker and the Python floor refusal. The floor now comes fromsdk/pyproject.tomlinstead of a copy in Go. The Go code and tests for these reads are removed.These stay in Go:
set-python-version,set-use-uvandset-base-image. Dang'sTOML.encodedoes not write the bytes go-toml writes: quoting, indentation, blank lines, the trailing newline, and datetimes turned into strings. Moving them would change every file they edit.edit-scopeandset-global-client.derive-resourcesandrender-template.Generation still builds the Go helper, because
edit-scopeandderive-resourcesrun on every generate.Known limitation: a
pyproject.tomlwith ananorinffloat anywhere can no longer be read. Dang'sTOML.decodeconverts through JSON, which has no NaN/Inf. Reads that used to succeed now raise:mod config get, the global-client and members reads during generation, and the Python floor refusal. The generated-marker read treats such a file as unmarked, so generation never overwrites or deletes it.Coverage: the deleted Go unit tests for the Python floor refusal are restored as one e2e check,
python-refusal-cases-check. It has the same cases: prereleases,==pins, ranges,~=, a major-only version, an unreadable pin, a pin overriding requires-python, and the last-release offer only where that release runs.Unchanged for a symlinked
sdk/orclients/<name>: the old helper got an include-filtered copy that drops a symlinked member, and the new read does not follow symlinks. Either way no generated marker is found, so generation treats the member as the user's and does not replace or delete it.Checks (rebased onto main after #90, which removed
remove-table), run one at a time withdagger check -m .dagger/modules/e2e <name>on CLI and enginev1.0.0-beta.25, all pass:config-check, python-refusal-cases-check, python-floor-refusal-check, generate-scope-init-check, generate-scope-user-content-check, generate-scope-clients-check, toml-generate-check, generate-scope-global-client-check, generate-scope-global-client-flag-check, generate-scope-existing-check, module-lookup-check, find-client-root-check, cli-sdk-check.
generate-scope-user-content-checkgains two regressions: a plain file and a symlink underclients/. Both fail without the fix.go vetandgo test ./...pass inhelpers/pyproject.Timing:
config-checkon a warm engine with a fresh nonce took 4 s on main and 2 s with this change. Cold timing was not measured.